package com.haikesi.api.mode.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
public class ModeSearchVO implements Serializable {

    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "模式名称")
    private String modeName;

    @ApiModelProperty(value = "激活模式")
    private Integer enableMode;

    @ApiModelProperty(value = "模式说明")
    private String modeReadme;

    @ApiModelProperty(value = "设备所属组织机构ID",hidden = true)
    private String organizationId;


    @ApiModelProperty(value = "页数")
    private Integer pageNum;
    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if(pageNum == null){
            pageNum = 1;
        }
        return pageNum;
    }
    public Integer getPageSize() {
        if(pageSize == null){
            pageSize = 20;
        }
        /*if(pageSize > 100){
            pageSize = 100;
        }*/
        return pageSize;
    }

}